class EhomeController < ApplicationController
  before_filter :login_required
  def index
    @eapps = Eapp.find(:all)
    @links = Array.new
    @links << {:title => "New application", :url => {:action => :eapp_new}}
  end
  def eapp_new
    if params[:eapp]
      @eapp = Eapp.new(:title => params[:eapp][:title], :directory => params[:eapp][:directory])
      @eapp.save
      flash[:success] = "You created a new application, "+params[:eapp][:title]+"."
      redirect_to :action => :index
    end
  end
end
